#include<iostream>
#include<string>
using namespace std;
class HasPtr{
public:
	HasPtr(const string &s=string()):ps(new string(s)),i(0){}
	HasPtr(const HasPtr &hp):ps(new string(*hp.ps)),i(hp.i){}
	HasPtr& operator=(HasPtr &hp){
		this->ps=new string(*hp.ps);
		this->i=hp.i;
		return *this;
	}
	~HasPtr(){delete ps;}
private:
	string *ps;
	int i;
}